SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE VIEW dbo.vwtPlazasAudit
AS
SELECT     dbo.tb_PlazasAudit.idPlazaAudit AS ID, dbo.tb_PlazasAudit.CUPOF, dbo.tb_SubOrganizaciones.Descripcion, dbo.tb_Organizaciones.Nombre, 
                      dbo.tb_Funciones.Descripcion AS Funcion, dbo.tb_Asignaturas.Descripcion AS Asignatura, dbo.tb_Divisiones.Mnemo, 
                      dbo.tb_Turnos.Descripcion AS Turno, dbo.tb_PlazasAudit.FechaAlta, dbo.tb_PlazasAudit.NroSecuencia, dbo.tb_PlazasAudit.Horas, 
                      dbo.tb_PlazasAudit.NormaCreacion, dbo.tb_PlazasAudit.Baja, dbo.tb_PlazasAudit.FechaBaja, dbo.tb_PlazasAudit.UltimoDocente, 
                      dbo.tb_PlazasAudit.NormaCierre, dbo.tb_Sistemas.Descripcion AS Sistema, dbo.tb_RegimenDeSuplencias.Descripcion AS RegimenDeSuplencia, 
                      dbo.tb_RegimenDesignaciones.Descripcion AS RegimenDesignacion, dbo.tb_RegimenLaboral.Descripcion AS RegimenLaboral, 
                      dbo.tb_Temporalidad.Descripcion AS Temporalidad, dbo.tb_PlazasAudit.DuenoActual, dbo.tb_PlazasAudit.SitRevDuenoActual, 
                      dbo.tb_PlazasAudit.Horario, dbo.tb_PlazasAudit.Paquete, dbo.tb_PlazasAudit.EsJefeDeOrg, dbo.tb_PlazasAudit.Observaciones, 
                      dbo.tb_PlazasAudit.CUISE, dbo.tb_PlazasAudit.PorcentajeSubsidio, dbo.tb_PlazasAudit.EsCabeceraDePaquete, dbo.tb_Usuarios.NTUser, 
                      dbo.tb_PlazasAudit.FechaRegistro, dbo.tb_PlazasAudit.ABM
FROM         dbo.tb_PlazasAudit INNER JOIN
                      dbo.tb_Funciones ON dbo.tb_PlazasAudit.Funcion = dbo.tb_Funciones.idFuncion INNER JOIN
                      dbo.tb_Sistemas ON dbo.tb_PlazasAudit.Sistema = dbo.tb_Sistemas.idSistema INNER JOIN
                      dbo.tb_RegimenLaboral ON dbo.tb_PlazasAudit.RegimenLaboral = dbo.tb_RegimenLaboral.idRegimenLaboral INNER JOIN
                      dbo.tb_RegimenDeSuplencias ON dbo.tb_PlazasAudit.RegimenSuplencias = dbo.tb_RegimenDeSuplencias.idRegimenSuplencia INNER JOIN
                      dbo.tb_Temporalidad ON dbo.tb_PlazasAudit.Temporalidad = dbo.tb_Temporalidad.idTemporalidad INNER JOIN
                      dbo.tb_Usuarios ON dbo.tb_PlazasAudit.NTUser = dbo.tb_Usuarios.idUsuario LEFT OUTER JOIN
                      dbo.tb_RegimenDesignaciones ON dbo.tb_PlazasAudit.RegimenDesigna = dbo.tb_RegimenDesignaciones.idRegimenDesignacion LEFT OUTER JOIN
                      dbo.tb_Turnos ON dbo.tb_PlazasAudit.Turno = dbo.tb_Turnos.idTurno LEFT OUTER JOIN
                      dbo.tb_Asignaturas ON dbo.tb_PlazasAudit.Asignatura = dbo.tb_Asignaturas.idAsignatura LEFT OUTER JOIN
                      dbo.tb_Divisiones ON dbo.tb_PlazasAudit.Division = dbo.tb_Divisiones.idDivision LEFT OUTER JOIN
                      dbo.tb_Organizaciones ON dbo.tb_PlazasAudit.Organizacion = dbo.tb_Organizaciones.idOrganizaciones LEFT OUTER JOIN
                      dbo.tb_SubOrganizaciones ON dbo.tb_PlazasAudit.SubOrganizacion = dbo.tb_SubOrganizaciones.idSubOrganizacion
GO
GRANT SELECT ON  [dbo].[vwtPlazasAudit] TO [Direcciones De Nivel]
GRANT SELECT ON  [dbo].[vwtPlazasAudit] TO [PersonalDocente]
GRANT SELECT ON  [dbo].[vwtPlazasAudit] TO [PersonalDocenteDireccion]
GRANT SELECT ON  [dbo].[vwtPlazasAudit] TO [SoloVer]
GO
EXEC sp_addextendedproperty N'MS_DiagramPane1', N'[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]
Begin DesignProperties = 
   Begin PaneConfigurations = 
      Begin PaneConfiguration = 0
         NumPanes = 4
         Configuration = "(H (1[40] 4[20] 2[20] 3) )"
      End
      Begin PaneConfiguration = 1
         NumPanes = 3
         Configuration = "(H (1 [50] 4 [25] 3))"
      End
      Begin PaneConfiguration = 2
         NumPanes = 3
         Configuration = "(H (1[50] 2[25] 3) )"
      End
      Begin PaneConfiguration = 3
         NumPanes = 3
         Configuration = "(H (4 [30] 2 [40] 3))"
      End
      Begin PaneConfiguration = 4
         NumPanes = 2
         Configuration = "(H (1 [56] 3))"
      End
      Begin PaneConfiguration = 5
         NumPanes = 2
         Configuration = "(H (2 [66] 3))"
      End
      Begin PaneConfiguration = 6
         NumPanes = 2
         Configuration = "(H (4 [50] 3))"
      End
      Begin PaneConfiguration = 7
         NumPanes = 1
         Configuration = "(V (3))"
      End
      Begin PaneConfiguration = 8
         NumPanes = 3
         Configuration = "(H (1 [56] 4 [18] 2))"
      End
      Begin PaneConfiguration = 9
         NumPanes = 2
         Configuration = "(H (1 [75] 4))"
      End
      Begin PaneConfiguration = 10
         NumPanes = 2
         Configuration = "(H (1[66] 2) )"
      End
      Begin PaneConfiguration = 11
         NumPanes = 2
         Configuration = "(H (4 [60] 2))"
      End
      Begin PaneConfiguration = 12
         NumPanes = 1
         Configuration = "(H (1) )"
      End
      Begin PaneConfiguration = 13
         NumPanes = 1
         Configuration = "(V (4))"
      End
      Begin PaneConfiguration = 14
         NumPanes = 1
         Configuration = "(V (2))"
      End
      ActivePaneConfig = 0
   End
   Begin DiagramPane = 
      Begin Origin = 
         Top = 0
         Left = 0
      End
      Begin Tables = 
         Begin Table = "tb_PlazasAudit"
            Begin Extent = 
               Top = 6
               Left = 38
               Bottom = 114
               Right = 268
            End
            DisplayFlags = 280
            TopColumn = 38
         End
         Begin Table = "tb_Funciones"
            Begin Extent = 
               Top = 6
               Left = 306
               Bottom = 114
               Right = 495
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "tb_Sistemas"
            Begin Extent = 
               Top = 114
               Left = 38
               Bottom = 192
               Right = 227
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "tb_RegimenLaboral"
            Begin Extent = 
               Top = 114
               Left = 265
               Bottom = 192
               Right = 454
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "tb_RegimenDeSuplencias"
            Begin Extent = 
               Top = 114
               Left = 492
               Bottom = 192
               Right = 681
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "tb_Temporalidad"
            Begin Extent = 
               Top = 192
               Left = 38
               Bottom = 270
               Right = 227
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "tb_RegimenDesignaciones"
            Begin Extent = 
               Top = 192
               Left = 265
               Bottom = 270
          ', 'USER', N'dbo', 'VIEW', N'vwtPlazasAudit', NULL, NULL
GO
EXEC sp_addextendedproperty N'MS_DiagramPane2', N'     Right = 454
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "tb_Turnos"
            Begin Extent = 
               Top = 192
               Left = 492
               Bottom = 285
               Right = 681
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "tb_Asignaturas"
            Begin Extent = 
               Top = 270
               Left = 38
               Bottom = 378
               Right = 227
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "tb_Divisiones"
            Begin Extent = 
               Top = 270
               Left = 265
               Bottom = 378
               Right = 454
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "tb_Organizaciones"
            Begin Extent = 
               Top = 288
               Left = 492
               Bottom = 396
               Right = 681
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "tb_SubOrganizaciones"
            Begin Extent = 
               Top = 378
               Left = 38
               Bottom = 486
               Right = 235
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "tb_Usuarios"
            Begin Extent = 
               Top = 6
               Left = 533
               Bottom = 114
               Right = 722
            End
            DisplayFlags = 280
            TopColumn = 3
         End
      End
   End
   Begin SQLPane = 
   End
   Begin DataPane = 
      Begin ParameterDefaults = ""
      End
      RowHeights = 220
      Begin ColumnWidths = 34
         Width = 284
         Width = 1440
         Width = 1440
         Width = 1440
         Width = 1440
         Width = 1440
         Width = 1440
         Width = 1440
         Width = 1440
         Width = 1440
         Width = 1440
         Width = 1440
         Width = 1440
         Width = 1440
         Width = 1440
         Width = 1440
         Width = 1440
         Width = 1440
         Width = 1440
         Width = 1440
         Width = 1440
         Width = 1440
         Width = 1440
         Width = 1440
         Width = 1440
         Width = 1440
         Width = 1440
         Width = 1440
         Width = 1440
         Width = 1440
         Width = 1440
         Width = 1440
         Width = 1440
         Width = 1440
      End
   End
   Begin CriteriaPane = 
      Begin ColumnWidths = 11
         Column = 1440
         Alias = 900
         Table = 1170
         Output = 720
         Append = 1400
         NewValue = 1170
         SortType = 1350
         SortOrder = 1410
         GroupBy = 1350
         Filter = 1350
         Or = 1350
         Or = 1350
         Or = 1350
      End
   End
End
', 'USER', N'dbo', 'VIEW', N'vwtPlazasAudit', NULL, NULL
GO
DECLARE @xp int
SELECT @xp=2
EXEC sp_addextendedproperty N'MS_DiagramPaneCount', @xp, 'USER', N'dbo', 'VIEW', N'vwtPlazasAudit', NULL, NULL
GO
